<?php

global $globales;

$globales['connexion'] = mysql_connect($globales['db_host'], $globales['db_user'], $globales['db_pass']) or die ("<div style=\"text-align: center;\">Error ! Database connexion failed<br />" . mysql_error() . "</div>");

define ("TBL_COMMENTAIRES", $globales['db_prefixe']."_commentaires");
define ("TBL_BLOCK", $globales['db_prefixe']."_block");
define ("TBL_COMPTEURS", $globales['db_prefixe']."_compteurs");
define ("TBL_INTERFACES", $globales['db_prefixe']."_interfaces");
define ("TBL_MEMBRES", $globales['db_prefixe']."_membres");
define ("TBL_MODULES", $globales['db_prefixe']."_modules");
define ("TBL_MP", $globales['db_prefixe']."_mp");
define ("TBL_FAVLINKS", $globales['db_prefixe']."_favlinks");
define ("TBL_NOUVELLES", $globales['db_prefixe']."_nouvelles");
define ("TBL_NOUVELLES_CATEGORIES", $globales['db_prefixe']."_nouvelles_categories");
define ("TBL_PERMISSIONS", $globales['db_prefixe']."_permissions");
define ("TBL_SESSIONS", $globales['db_prefixe']."_sessions");
define ("TBL_SMILEYS", $globales['db_prefixe']."_smileys");
define ("TBL_VOTES", $globales['db_prefixe']."_votes");
define ("TBL_RECRUTEMENTS", $globales['db_prefixe']."_recrutements");
define ("TBL_R_MODELES", $globales['db_prefixe']."_recrutements_modeles");
define ("TBL_SONDAGE", $globales['db_prefixe']."_sondage");
define ("TBL_S_REPONSE", $globales['db_prefixe']."_sondage_reponse");
define ("TBL_S_VOTE", $globales['db_prefixe']."_sondage_vote");
define ("TBL_BANS", $globales['db_prefixe']."_bans");

function connect() {global $globales; mysql_select_db($globales['db_name'], $globales['connexion']) or die ("<div style=\"text-align: center;\">Error ! Database connexion failed<br />Check your database's name<br />" . mysql_error() . "</div>");}
function disconnect() {global $globales; mysql_close($globales['connexion']);}

?>